from django.urls import path
from rest_framework import routers

from knight_api.views import *

from django.conf import settings
from django.conf.urls.static import static


urlpatterns = [
    path("login/account", Login.as_view()),
    path("login/outLogin", Logout.as_view()),  ### 退出登录
    # path('login/',AdminUserView.as_view({'get':'list',"post":'create'}))
    path('login', Login.as_view()),
    path('info', Info.as_view()),

    path("currentUser", CurrentUser.as_view()),

    path('upload/', UpLoadInfo),
]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

router = routers.SimpleRouter(trailing_slash=False)
router.register('menu', MenuView, basename='menu')
router.register('admins', AdminView, basename='admins')

router.register('roles', RoleView, basename='roles')

router.register('mes', LoginMesView, basename='mes')  # 用户日志记录

router.register('mem', MemberView, basename='mem')  # 会员管理
router.register('pla', PlatfromView, basename='pla')  # 会员注册平台

router.register('city', CitycategoryView, basename='city')  # 城市联动
router.register('cityall', CitycategoryView2, basename='cityall')  # 城市联动
router.register('eduction', EductionView, basename='eduction')  # 学历
router.register('jobtype', JobcategoryView, basename='jobtype')  # 工作种类联动
router.register('jobtypeall', JobcategoryView2, basename='jobtypeall')  # 工作种类联动
router.register('jobm', JobmajorsView, basename='jobm')  # 专业种类
router.register('audit', ResumeAuditView, basename='audit')  # 审核状态
router.register('jobd', JobDisplayView, basename='jobd')  # 招聘信息 状态
router.register('jobtag', JobTagView, basename='jobtag')  # 公司福利
router.register('jobn', JobNatureView, basename='jobn')  # 职位性质
router.register('exprience', ExperienceView, basename='exprience')  # 工作经验
router.register('company', CompanyView, basename='company')  # 公司信息表
router.register('contac', ContactView, basename='contac')  # 联系方式
router.register('pinfo', PositionInfoView, basename='pinfo')  # 职位信息
# router.register('regin_from', Regin_fromView, basename='regin_from')  # 广告位来自
router.register('regin_type', Regin_typeView, basename='regin_type')  # 广告位类型
router.register('regin_gg', Regin_ggView, basename='regin_gg')  # 广告位信息
router.register('adlist', Gg_listView, basename='adlist')  # 广告信息


urlpatterns += router.urls
